﻿using System;
using System.Web.UI;

namespace Evolution.UI.WebParts
{
    [Serializable]
    public class NotFoundAction : BaseAction
    {
        #region Properties

        public override string Caption
        {
            get { return "Not found"; }
        }

        public override bool RequireCondition
        {
            get { return true; }
            set { }
        }

        #endregion

        #region Methods

        public override void Execute(Page page, PageActionWebPart part)
        {
            page.Response.ClearContent();
            page.Response.ClearHeaders();
            page.Response.StatusCode = 404;
            page.Response.End();
        }

        public override string GetDescription()
        {
            return "Not found";
        }

        #endregion
    }
}
